<template>
    <div>
        <child msg="分数" :count="count" @click="plus10Handler"></child>
        <br/>
        <br/>
        <br/>
        <button @click="plusHandler">加分</button>
    </div>

</template>

<script>
    import child from "./child"

    export default {
        name: "emit-index",
        components: {
            child
        },
        data() {
            return {
                count: 0
            }
        },
        methods: {
            plusHandler() {
                this.count++
            },
            plus10Handler(val) {
                this.count += val
            }
        }
    }
</script>

<style scoped>

</style>
